import React, { PureComponent } from 'react';
import index from "../../routes/Forms/StepForm/index";

class ImagePreview extends PureComponent {

  render() {
    const { imageSrc,imageIndex } = this.props;
    const imageLength = imageSrc.length;

    return (
      <div>
        <Modal
          visible={iamgeVisible}
          footer={null}
          onCancel={this.handleCancelImageModal}>
          <div>
            <div>{index <= 0 ? "" : <Icon type="left" /> }</div>
            <div><img alt="图片" style={{ width: '100%' }} src={imageSrc[imageIndex].src} /></div>
            <div>{index >= imageLength ? "" : <Icon type="right" /> }</div>
          </div>

        </Modal>
      </div>
    )

  }
}

export default ImagePreview;
